WWL.jconed = function ( id, hidden_id, params )
{
	var editor = new WWL ( 'jconed', id );

	jconed.register_loader ( function ( editor )
	{
		if ( editor.id == id )
		{
			editor.cback [ 'confirm' ] = function () 
			{
				//$( hidden_id ).value = escape ( liwe.utils.map_entities ( editor.get_value ().htmlEntities () ) );
				$( hidden_id ).value = editor.get_value ();
			};
		}
	} );

	editor.set_value = function ( value )
	{
		var ed = jconed.get ( id );
		ed.set_value ( value );
		if ( hidden_id )
			$( hidden_id ).value = value;
	};

	editor.get_value = function () 
	{
		var ed = jconed.get ( id );
		var value = ed.get_value ();
		var re = RegExp ( jconed.PLUGIN_START + "(.|\\n|\\r)*?" + jconed.PLUGIN_END, "g" );

		value = value.replace ( re, jconed.PLUGIN_START + '<div class="content"></div>' + jconed.PLUGIN_END ).replace ( / rendered"/g, '"' );

		return value;

		//return liwe.utils.map_entities ( value.htmlEntities () );
	};

	editor.render = function ()
	{
		var ed = new jconed.editor ( id, params );
		jconed.toolbar.hide ();
	};

	return editor;
};
